package cn.py.boot_lua.pattern.decorator;

public class LoggingOrderServiceDecorator implements OrderService {
    private OrderService decorated;

    public LoggingOrderServiceDecorator(OrderService decorated) {
        this.decorated = decorated;
    }

    @Override
    public void placeOrder(String orderId) {
        System.out.println("调用 placeOrder，订单ID: " + orderId);
        decorated.placeOrder(orderId);
        System.out.println("订单处理完成: " + orderId);
    }
}
